const net = require('net');

const server = net.createServer((socket) => {
    socket.write('world');
    socket.on('data', (chunk) => {
        console.log(chunk.toString());
    })
})

server.on('error', (err) => {
    throw err;
})

server.listen(9527, () => {
    console.log('opened server on', server.address());
})